package com.huwaiwai.enumtest;

/**
 * Created by hww on 2018/2/17 下午9:33.
 */
public class EnumTest {

    public static void main(String [] a) {
        System.out.println(Size.SMALL);
        System.out.println(Size.MEDIUM);
        System.out.println(Size.LARGE);
        System.out.println(Size.EXTRA_LARGE);
    }
}

enum Size {
    SMALL("s", "小号"),
    MEDIUM("m", "中号"),
    LARGE("l", "大号"),
    EXTRA_LARGE("xl", "加大号");
    private String english;
    private String chinese;
    Size(String english, String chinese) {
     this.english = english;
     this.chinese = chinese;
    }
    public String getEnglish() {
        return english;
    }
    public String getChinese() {
        return chinese;
    }
    @Override
    public String toString() {
        return "英文名:[" + english + "]" + "中文名:[" + chinese + "]";
    }
}
